package com.zmn.oms.business.interfaces.discount;

import com.zmn.oms.common.dto.OmsOperator;
import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.bo.orderamount.OrderDiscountCompareBO;
import com.zmn.oms.model.dto.discount.ActivityDiscountDTO;
import com.zmn.oms.model.dto.discount.AddDiscountDTO;
import com.zmn.oms.model.dto.order.OrderDTO;
import com.zmn.oms.model.entity.discount.OrderDiscount;
import com.zmn.oms.model.entity.work.OrderWork;

import java.util.List;

/**
 * 类描述：工单优惠
 *
 * @author heciqi
 * @date 2018/12/10 9:59
 */
public interface OrderDiscountBService {

	/**
	 * 工程师优惠
     * @param addDiscountDTO
     */
	void masterDiscount(AddDiscountDTO addDiscountDTO) throws OmsBaseException;

	/**
	 * 后台运营优惠
	 * @param addDiscountDTO
	 */
	void operatorDiscount(AddDiscountDTO addDiscountDTO) throws OmsBaseException;

	/**
	 * 活动优惠
	 * @param activityDiscountDTO
	 */
	void activityDiscount(ActivityDiscountDTO activityDiscountDTO) throws OmsBaseException;

	/**
	 * 渠道优惠
	 * @param addDiscountDTO
	 */
	void channelDiscount(AddDiscountDTO addDiscountDTO) throws OmsBaseException;

	/**
	 * 保存订单优惠 （先删后增）
	 * @param orderDiscountList
	 */
	void saveOrderDiscountList(List<OrderDiscount> orderDiscountList, Long orderId) throws OmsBaseException;

	/**
	 * 校验次卡订单是否可用
	 * @param orderDTO
	 * @return true 可用，不修改 false 不可用，需要删除次卡相关信息
	 */
	boolean checkTimesCoupCanUse(OrderDTO orderDTO) throws OmsBaseException;

	/**
	 * 校验次卡订单是否可用
	 * @param operator
	 * @return 刷新订单优惠
	 */
	OrderDiscountCompareBO refreshOrderDiscount(OmsOperator operator) throws OmsBaseException;
}
